package com.example.demo.web;


import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController //@Controller +@responsecontroller
public class HelloController {

    @Resource
    private UserMapper userMapper;
    @RequestMapping("/hello")
    public String Hello(String name){
        return name+" say good evening";
    }


    @RequestMapping("/test")
    public String Test(String name){

        User companyEquipment = userMapper.selectById(1);
        System.out.println(companyEquipment.toString());

        return name+" say good evening";
    }

}
